package com.zzuli.ylsystem.dao;

import com.zzuli.ylsystem.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserDao {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    @Select("select * from user where unionid=#{unionid}")
    User selectUserByUnionId(String unionid);

    @Select("select * from user where role=2")
    List<User> selectAll();
}